package gas.model;

public enum LocationsEnum{
    SANDIEGO(0, "san diego"),
    LAJOLLA(1, "la jolla"),
    MARS(2, "mars"),
    CHINA(3, "china"),
    SANJOSE(4, "san jose"),
    MEXICO(5, "mexico"),
    NOWHERE(6, "nowhere")
    ;
    private int testId;
    private String location;
    LocationsEnum(int id, String loc){
      testId = id; 
      location = loc;
    }
    public int id(){return testId;} 
    public String location(){ return location;}
    public static LocationsEnum getMatch(String ms){
      LocationsEnum retLE; 
        if (ms.equalsIgnoreCase("china")) return LocationsEnum.CHINA;
        else if (ms.equalsIgnoreCase("mars")) return LocationsEnum.MARS;
        else if (ms.equalsIgnoreCase("san diego")) return LocationsEnum.SANDIEGO;
        else if (ms.equalsIgnoreCase("la jolla")) return LocationsEnum.LAJOLLA;
        else if (ms.equalsIgnoreCase("san jose")) return LocationsEnum.SANJOSE;
        else if (ms.equalsIgnoreCase("mexico")) return LocationsEnum.MEXICO;
        else return LocationsEnum.NOWHERE;
    }
  }
